﻿using SqlSugar;
using System;

namespace IconYuan.Model.Entity.Articles
{
    [SugarTable("t_article")]
    public class ArticleBase
    {
        /// <summary>
        /// 文章ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public int article_id { set; get; }
        /// <summary>
        /// 文章标题
        /// </summary>
        public string title { set; get; }
        ///// <summary>
        ///// 列表显示方式 (10小图展示 20大图展示)
        ///// </summary>
        //public int show_type { set; get; } = 10;
        /// <summary>
        /// 文章分类ID
        /// </summary>
        public int category_id { set; get; }
        /// <summary>
        /// 文章排序 (数字越小越靠前)
        /// </summary>
        public int sort { set; get; } = 100;
        /// <summary>
        /// 文章状态 (0隐藏 1显示)
        /// </summary>
        public int status { set; get; } = 1;
        /// <summary>
        /// 显示的浏览次数（虚拟阅读量+实际阅读量）
        /// </summary>
        public int show_views { set; get; }
        /// <summary>
        /// 封面图ID
        /// </summary>
        public int image_id { set; get; }
        public string image_url { set; get; }

        public int store_id { get; set; }
        /// <summary>
        /// 纯文本简介
        /// </summary>
        public string selling_point { get; set; } = string.Empty;
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime create_time { get; set; }
    }

    [SugarTable("t_article")]
    public class Article : ArticleBase
    {
        /// <summary>
        /// 文章内容
        /// </summary>
        public string content { set; get; }
    }
}
